using System.Net.Sockets;

namespace Pinwheel.Kernel
{
    public interface ISocketReceiveListener
    {
        public void OnReceive(ISocketSession session);
    }
    
    public interface ISocketSendListener
    {
        public void OnSend(ISocketSession session, ref byte[] data);
    }
    
    public interface ISocketConnectedListener
    {
        public void OnConnected(ISocketSession session);
        
        public void OnConnectFailed(ISocketSession session);
        
        public void OnClose(ISocketSession session);
    }
    
    public interface ISocketErrorListener
    {
        public void OnError(ISocketSession session, SocketError error);
    }

    public interface ISocketListener : ISocketReceiveListener, ISocketConnectedListener, ISocketErrorListener
    {
    }
}